/*
Copyright (C) 2011  Christoph Schnack, Berlin (Germany)

This file is part of Tribuit.

    Tribuit is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Tribuit is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Tribuit.  If not, see <http://www.gnu.org/licenses/>.
*/
package GuiTools;

import java.awt.Component;

import javax.swing.JScrollPane;

/**
 * @author Christoph Schnack
 *
 */
public class CustomScrollPane extends JScrollPane{
	
	/**
	 * JScrollPane with UnitIncrement 30 on both ScrollBars.
	 * @param component scrolled component
	 */
	public CustomScrollPane(Component component){
		super(component);
		this.getVerticalScrollBar().setUnitIncrement(30);
		this.getHorizontalScrollBar().setUnitIncrement(30);
	}
	
	public CustomScrollPane(Component c,int xScroll, int yScroll){
		super(c);
		this.getVerticalScrollBar().setUnitIncrement(yScroll);
		this.getHorizontalScrollBar().setUnitIncrement(xScroll);
	}
}
